<?php  if(is_array($areaswithtables)){ ?>
<?xml version="1.0" encoding="UTF-8"?>
	<cafestore_manufacture>
	<?php
		foreach ($areaswithtables as $tablesinarea){
	?>
			<area id="<?php echo $tablesinarea['Area']['id']?>" name="<?php echo $tablesinarea['Area']['area_name']; ?>" >
			<?php 
				foreach ($tablesinarea['Table'] as $table){
			?>
				<table id="<?php echo $table['id'];?>">
					<name><?php echo $table['table_name'];?></name>
					<used><?php echo $table['used'];?></used>
					<ordered><?php echo $table['ordered'];?></ordered>
					<prepared><?php echo $table['prepared'];?></prepared>
				</table>
			<?php 
				}
			?>
			</area>
	<?php 
		}
	?>
	</cafestore_manufacture>
<?php 
}
?>